<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>大学信息</title>
    <link rel="stylesheet" th:href="@{/layui/css/font.css}">
    <link rel="stylesheet" th:href="@{/layui/css/xadmin.css}">
    <link rel="stylesheet" th:href="@{/layui/css/login.css}">
    <script charset="utf-8" th:src="@{/layui/lib/layui/layui.js}"></script>
    <script th:src="@{/layui/js/xadmin.js}" type="text/javascript"></script>
    <style>
        body,html {
            width: 100%;
            height: 100%;
            margin: 0;
            padding: 0;
        }
        .login {
            max-width: 700px;
            height: 520px;
            margin: 80px auto 0 auto;
        }
        .login input[type=text], .login input[type=file], .login input[type=password], .login input[type=email], select {
            display: inline-block;
        }
    </style>
</head>
<body class="login-bg">
<div class="login layui-anim layui-anim-up">
    <div class="message">University Info</div>
    <div id="darkbannerwrap"></div>
    <div style="margin: auto; width: 200px; height: 200px;float: left">
        <img alt="" src="" style="height: 100%;width: 100%;margin-top: 30px" th:src="@{/images/university.png}">
    </div>
    <form class="layui-form" style="float: left; width: 350px;margin-left: 40px">
        <hr class="hr20">
        <label for="universityName">名&emsp;&emsp;称&emsp;</label>
        <input class="layui-input" id="universityName" name="universityName" style="width: 240px"
               th:value="${university.universityName}" type="text">
        <hr class="hr15">
        <label for="email">邮&emsp;&emsp;箱&emsp;</label>
        <input class="layui-input" id="email" name="email" style="width: 240px" th:value="${university.email}"
               type="text">
        <hr class="hr15">
        <label for="password">密&emsp;&emsp;码&emsp;</label>
        <input class="layui-input" id="password" name="password" style="width: 240px" th:value="${university.password}"
               type="password">
        <hr class="hr15">
        <label for="phone">联系方式&emsp;</label>
        <input class="layui-input" id="phone" name="phone" style="width: 240px" th:value="${university.phone}"
               type="text">
        <hr class="hr15">
        <label for="cityName">所属地区&emsp;</label>
        <input class="layui-input" id="cityName" name="cityName" style="width: 240px"
               th:value="${university.city.cityName}" type="text">
        <hr class="hr15">
        <hr class="hr20">
    </form>
</div>
<script type="text/javascript">
    window.onload=function () {
        const input = document.getElementsByClassName("layui-input");
        for (let i = 0; i < input.length; i++) {
            input[i].setAttribute('readonly', 'true');
        }
    }
</script>
</body>
</html>